package com.example.app.security;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * JWT配置属性
 */
@Data
@Component
@ConfigurationProperties(prefix = "jwt")
public class JwtProperties {
    
    /**
     * JWT密钥
     */
    private String secret = "mySecretKey123456789012345678901234567890";
    
    /**
     * JWT过期时间（秒）默认7天
     */
    private Long expiration = 7 * 24 * 60 * 60L;
    
    /**
     * JWT刷新token过期时间（秒）默认30天
     */
    private Long refreshExpiration = 30 * 24 * 60 * 60L;
    
    /**
     * JWT token前缀
     */
    private String tokenPrefix = "Bearer ";
    
    /**
     * JWT header名称
     */
    private String header = "Authorization";
}